\(\int (a+b \sin (c+d x)) \tan ^5(c+d x) \, dx\) [1483]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F(-1)]
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 19, antiderivative size = 116 \[ \int (a+b \sin (c+d x)) \tan ^5(c+d x) \, dx=-\frac {(8 a+15 b) \log (1-\sin (c+d x))}{16 d}-\frac {(8 a-15 b) \log (1+\sin (c+d x))}{16 d}-\frac {15 b \sin (c+d x)}{8 d}-\frac {(4 a+5 b \sin (c+d x)) \tan ^2(c+d x)}{8 d}+\frac {(a+b \sin (c+d x)) \tan ^4(c+d x)}{4 d} \]

[Out]

-1/16*(8*a+15*b)*ln(1-sin(d*x+c))/d-1/16*(8*a-15*b)*ln(1+sin(d*x+c))/d-15/8*b*sin(d*x+c)/d-1/8*(4*a+5*b*sin(d*
x+c))*tan(d*x+c)^2/d+1/4*(a+b*sin(d*x+c))*tan(d*x+c)^4/d

Rubi [A] (verified)

Time = 0.07 (sec) , antiderivative size = 116, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.263, Rules used = {2800, 833, 788, 647, 31} \[ \int (a+b \sin (c+d x)) \tan ^5(c+d x) \, dx=-\frac {(8 a+15 b) \log (1-\sin (c+d x))}{16 d}-\frac {(8 a-15 b) \log (\sin (c+d x)+1)}{16 d}+\frac {\tan ^4(c+d x) (a+b \sin (c+d x))}{4 d}-\frac {\tan ^2(c+d x) (4 a+5 b \sin (c+d x))}{8 d}-\frac {15 b \sin (c+d x)}{8 d} \]

[In]

Int[(a + b*Sin[c + d*x])*Tan[c + d*x]^5,x]

[Out]

-1/16*((8*a + 15*b)*Log[1 - Sin[c + d*x]])/d - ((8*a - 15*b)*Log[1 + Sin[c + d*x]])/(16*d) - (15*b*Sin[c + d*x
])/(8*d) - ((4*a + 5*b*Sin[c + d*x])*Tan[c + d*x]^2)/(8*d) + ((a + b*Sin[c + d*x])*Tan[c + d*x]^4)/(4*d)

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rule 647

Int[((d_) + (e_.)*(x_))/((a_) + (c_.)*(x_)^2), x_Symbol] :> With[{q = Rt[(-a)*c, 2]}, Dist[e/2 + c*(d/(2*q)),
Int[1/(-q + c*x), x], x] + Dist[e/2 - c*(d/(2*q)), Int[1/(q + c*x), x], x]] /; FreeQ[{a, c, d, e}, x] && NiceS
qrtQ[(-a)*c]

Rule 788

Int[(((d_.) + (e_.)*(x_))*((f_) + (g_.)*(x_)))/((a_) + (c_.)*(x_)^2), x_Symbol] :> Simp[e*g*(x/c), x] + Dist[1
/c, Int[(c*d*f - a*e*g + c*(e*f + d*g)*x)/(a + c*x^2), x], x] /; FreeQ[{a, c, d, e, f, g}, x]

Rule 833

Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))*((a_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Simp[(d + e*x)^(m
 - 1)*(a + c*x^2)^(p + 1)*((a*(e*f + d*g) - (c*d*f - a*e*g)*x)/(2*a*c*(p + 1))), x] - Dist[1/(2*a*c*(p + 1)),
Int[(d + e*x)^(m - 2)*(a + c*x^2)^(p + 1)*Simp[a*e*(e*f*(m - 1) + d*g*m) - c*d^2*f*(2*p + 3) + e*(a*e*g*m - c*
d*f*(m + 2*p + 2))*x, x], x], x] /; FreeQ[{a, c, d, e, f, g}, x] && NeQ[c*d^2 + a*e^2, 0] && LtQ[p, -1] && GtQ
[m, 1] && (EqQ[d, 0] || (EqQ[m, 2] && EqQ[p, -3] && RationalQ[a, c, d, e, f, g]) ||  !ILtQ[m + 2*p + 3, 0])

Rule 2800

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*tan[(e_.) + (f_.)*(x_)]^(p_.), x_Symbol] :> Dist[1/f, Subst[I
nt[(x^p*(a + x)^m)/(b^2 - x^2)^((p + 1)/2), x], x, b*Sin[e + f*x]], x] /; FreeQ[{a, b, e, f, m}, x] && NeQ[a^2
 - b^2, 0] && IntegerQ[(p + 1)/2]

Rubi steps \begin{align*} \text {integral}& = \frac {\text {Subst}\left (\int \frac {x^5 (a+x)}{\left (b^2-x^2\right )^3} \, dx,x,b \sin (c+d x)\right )}{d} \\ & = \frac {(a+b \sin (c+d x)) \tan ^4(c+d x)}{4 d}-\frac {\text {Subst}\left (\int \frac {x^3 \left (4 a b^2+5 b^2 x\right )}{\left (b^2-x^2\right )^2} \, dx,x,b \sin (c+d x)\right )}{4 b^2 d} \\ & = -\frac {(4 a+5 b \sin (c+d x)) \tan ^2(c+d x)}{8 d}+\frac {(a+b \sin (c+d x)) \tan ^4(c+d x)}{4 d}+\frac {\text {Subst}\left (\int \frac {x \left (8 a b^4+15 b^4 x\right )}{b^2-x^2} \, dx,x,b \sin (c+d x)\right )}{8 b^4 d} \\ & = -\frac {15 b \sin (c+d x)}{8 d}-\frac {(4 a+5 b \sin (c+d x)) \tan ^2(c+d x)}{8 d}+\frac {(a+b \sin (c+d x)) \tan ^4(c+d x)}{4 d}-\frac {\text {Subst}\left (\int \frac {-15 b^6-8 a b^4 x}{b^2-x^2} \, dx,x,b \sin (c+d x)\right )}{8 b^4 d} \\ & = -\frac {15 b \sin (c+d x)}{8 d}-\frac {(4 a+5 b \sin (c+d x)) \tan ^2(c+d x)}{8 d}+\frac {(a+b \sin (c+d x)) \tan ^4(c+d x)}{4 d}+\frac {(8 a-15 b) \text {Subst}\left (\int \frac {1}{-b-x} \, dx,x,b \sin (c+d x)\right )}{16 d}+\frac {(8 a+15 b) \text {Subst}\left (\int \frac {1}{b-x} \, dx,x,b \sin (c+d x)\right )}{16 d} \\ & = -\frac {(8 a+15 b) \log (1-\sin (c+d x))}{16 d}-\frac {(8 a-15 b) \log (1+\sin (c+d x))}{16 d}-\frac {15 b \sin (c+d x)}{8 d}-\frac {(4 a+5 b \sin (c+d x)) \tan ^2(c+d x)}{8 d}+\frac {(a+b \sin (c+d x)) \tan ^4(c+d x)}{4 d} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.23 (sec) , antiderivative size = 136, normalized size of antiderivative = 1.17 \[ \int (a+b \sin (c+d x)) \tan ^5(c+d x) \, dx=\frac {15 b \text {arctanh}(\sin (c+d x))}{8 d}+\frac {15 b \sec (c+d x) \tan (c+d x)}{8 d}-\frac {15 b \sec ^3(c+d x) \tan (c+d x)}{4 d}+\frac {5 b \sec (c+d x) \tan ^3(c+d x)}{d}-\frac {b \sin (c+d x) \tan ^4(c+d x)}{d}-\frac {a \left (4 \log (\cos (c+d x))+2 \tan ^2(c+d x)-\tan ^4(c+d x)\right )}{4 d} \]

[In]

Integrate[(a + b*Sin[c + d*x])*Tan[c + d*x]^5,x]

[Out]

(15*b*ArcTanh[Sin[c + d*x]])/(8*d) + (15*b*Sec[c + d*x]*Tan[c + d*x])/(8*d) - (15*b*Sec[c + d*x]^3*Tan[c + d*x
])/(4*d) + (5*b*Sec[c + d*x]*Tan[c + d*x]^3)/d - (b*Sin[c + d*x]*Tan[c + d*x]^4)/d - (a*(4*Log[Cos[c + d*x]] +
 2*Tan[c + d*x]^2 - Tan[c + d*x]^4))/(4*d)

Maple [A] (verified)

Time = 0.74 (sec) , antiderivative size = 121, normalized size of antiderivative = 1.04

method result size
derivativedivides \(\frac {a \left (\frac {\left (\tan ^{4}\left (d x +c \right )\right )}{4}-\frac {\left (\tan ^{2}\left (d x +c \right )\right )}{2}-\ln \left (\cos \left (d x +c \right )\right )\right )+b \left (\frac {\sin ^{7}\left (d x +c \right )}{4 \cos \left (d x +c \right )^{4}}-\frac {3 \left (\sin ^{7}\left (d x +c \right )\right )}{8 \cos \left (d x +c \right )^{2}}-\frac {3 \left (\sin ^{5}\left (d x +c \right )\right )}{8}-\frac {5 \left (\sin ^{3}\left (d x +c \right )\right )}{8}-\frac {15 \sin \left (d x +c \right )}{8}+\frac {15 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )}{d}\) \(121\)
default \(\frac {a \left (\frac {\left (\tan ^{4}\left (d x +c \right )\right )}{4}-\frac {\left (\tan ^{2}\left (d x +c \right )\right )}{2}-\ln \left (\cos \left (d x +c \right )\right )\right )+b \left (\frac {\sin ^{7}\left (d x +c \right )}{4 \cos \left (d x +c \right )^{4}}-\frac {3 \left (\sin ^{7}\left (d x +c \right )\right )}{8 \cos \left (d x +c \right )^{2}}-\frac {3 \left (\sin ^{5}\left (d x +c \right )\right )}{8}-\frac {5 \left (\sin ^{3}\left (d x +c \right )\right )}{8}-\frac {15 \sin \left (d x +c \right )}{8}+\frac {15 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )}{d}\) \(121\)
parallelrisch \(\frac {16 \left (\frac {3}{4}+\frac {\cos \left (4 d x +4 c \right )}{4}+\cos \left (2 d x +2 c \right )\right ) a \ln \left (\sec ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-16 \left (\frac {3}{4}+\frac {\cos \left (4 d x +4 c \right )}{4}+\cos \left (2 d x +2 c \right )\right ) \left (a +\frac {15 b}{8}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )-16 \left (a -\frac {15 b}{8}\right ) \left (\frac {3}{4}+\frac {\cos \left (4 d x +4 c \right )}{4}+\cos \left (2 d x +2 c \right )\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )-4 a \cos \left (2 d x +2 c \right )+3 \cos \left (4 d x +4 c \right ) a -2 b \sin \left (5 d x +5 c \right )-5 b \sin \left (d x +c \right )-15 b \sin \left (3 d x +3 c \right )+a}{4 d \left (\cos \left (4 d x +4 c \right )+4 \cos \left (2 d x +2 c \right )+3\right )}\) \(208\)
risch \(i a x +\frac {i b \,{\mathrm e}^{i \left (d x +c \right )}}{2 d}-\frac {i b \,{\mathrm e}^{-i \left (d x +c \right )}}{2 d}+\frac {2 i a c}{d}+\frac {i \left (16 i a \,{\mathrm e}^{6 i \left (d x +c \right )}+9 b \,{\mathrm e}^{7 i \left (d x +c \right )}+16 i a \,{\mathrm e}^{4 i \left (d x +c \right )}+b \,{\mathrm e}^{5 i \left (d x +c \right )}+16 i a \,{\mathrm e}^{2 i \left (d x +c \right )}-b \,{\mathrm e}^{3 i \left (d x +c \right )}-9 b \,{\mathrm e}^{i \left (d x +c \right )}\right )}{4 d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{4}}-\frac {a \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{d}+\frac {15 \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) b}{8 d}-\frac {a \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}{d}-\frac {15 \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) b}{8 d}\) \(229\)
norman \(\frac {-\frac {15 b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{4 d}+\frac {10 b \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}-\frac {9 b \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 d}+\frac {10 b \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}-\frac {15 b \left (\tan ^{9}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 d}+\frac {6 a \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {6 a \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}-\frac {2 a \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}-\frac {2 a \left (\tan ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}}{\left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{4} \left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}+\frac {a \ln \left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}-\frac {\left (8 a -15 b \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{8 d}-\frac {\left (8 a +15 b \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{8 d}\) \(252\)

[In]

int(sec(d*x+c)^5*sin(d*x+c)^5*(a+b*sin(d*x+c)),x,method=_RETURNVERBOSE)

[Out]

1/d*(a*(1/4*tan(d*x+c)^4-1/2*tan(d*x+c)^2-ln(cos(d*x+c)))+b*(1/4*sin(d*x+c)^7/cos(d*x+c)^4-3/8*sin(d*x+c)^7/co
s(d*x+c)^2-3/8*sin(d*x+c)^5-5/8*sin(d*x+c)^3-15/8*sin(d*x+c)+15/8*ln(sec(d*x+c)+tan(d*x+c))))

Fricas [A] (verification not implemented)

none

Time = 0.33 (sec) , antiderivative size = 114, normalized size of antiderivative = 0.98 \[ \int (a+b \sin (c+d x)) \tan ^5(c+d x) \, dx=-\frac {{\left (8 \, a - 15 \, b\right )} \cos \left (d x + c\right )^{4} \log \left (\sin \left (d x + c\right ) + 1\right ) + {\left (8 \, a + 15 \, b\right )} \cos \left (d x + c\right )^{4} \log \left (-\sin \left (d x + c\right ) + 1\right ) + 16 \, a \cos \left (d x + c\right )^{2} + 2 \, {\left (8 \, b \cos \left (d x + c\right )^{4} + 9 \, b \cos \left (d x + c\right )^{2} - 2 \, b\right )} \sin \left (d x + c\right ) - 4 \, a}{16 \, d \cos \left (d x + c\right )^{4}} \]

[In]

integrate(sec(d*x+c)^5*sin(d*x+c)^5*(a+b*sin(d*x+c)),x, algorithm="fricas")

[Out]

-1/16*((8*a - 15*b)*cos(d*x + c)^4*log(sin(d*x + c) + 1) + (8*a + 15*b)*cos(d*x + c)^4*log(-sin(d*x + c) + 1)
+ 16*a*cos(d*x + c)^2 + 2*(8*b*cos(d*x + c)^4 + 9*b*cos(d*x + c)^2 - 2*b)*sin(d*x + c) - 4*a)/(d*cos(d*x + c)^
4)

Sympy [F(-1)]

Timed out. \[ \int (a+b \sin (c+d x)) \tan ^5(c+d x) \, dx=\text {Timed out} \]

[In]

integrate(sec(d*x+c)**5*sin(d*x+c)**5*(a+b*sin(d*x+c)),x)

[Out]

Timed out

Maxima [A] (verification not implemented)

none

Time = 0.19 (sec) , antiderivative size = 108, normalized size of antiderivative = 0.93 \[ \int (a+b \sin (c+d x)) \tan ^5(c+d x) \, dx=-\frac {{\left (8 \, a - 15 \, b\right )} \log \left (\sin \left (d x + c\right ) + 1\right ) + {\left (8 \, a + 15 \, b\right )} \log \left (\sin \left (d x + c\right ) - 1\right ) + 16 \, b \sin \left (d x + c\right ) - \frac {2 \, {\left (9 \, b \sin \left (d x + c\right )^{3} + 8 \, a \sin \left (d x + c\right )^{2} - 7 \, b \sin \left (d x + c\right ) - 6 \, a\right )}}{\sin \left (d x + c\right )^{4} - 2 \, \sin \left (d x + c\right )^{2} + 1}}{16 \, d} \]

[In]

integrate(sec(d*x+c)^5*sin(d*x+c)^5*(a+b*sin(d*x+c)),x, algorithm="maxima")

[Out]

-1/16*((8*a - 15*b)*log(sin(d*x + c) + 1) + (8*a + 15*b)*log(sin(d*x + c) - 1) + 16*b*sin(d*x + c) - 2*(9*b*si
n(d*x + c)^3 + 8*a*sin(d*x + c)^2 - 7*b*sin(d*x + c) - 6*a)/(sin(d*x + c)^4 - 2*sin(d*x + c)^2 + 1))/d

Giac [A] (verification not implemented)

none

Time = 0.35 (sec) , antiderivative size = 108, normalized size of antiderivative = 0.93 \[ \int (a+b \sin (c+d x)) \tan ^5(c+d x) \, dx=-\frac {{\left (8 \, a - 15 \, b\right )} \log \left ({\left | \sin \left (d x + c\right ) + 1 \right |}\right ) + {\left (8 \, a + 15 \, b\right )} \log \left ({\left | \sin \left (d x + c\right ) - 1 \right |}\right ) + 16 \, b \sin \left (d x + c\right ) - \frac {2 \, {\left (6 \, a \sin \left (d x + c\right )^{4} + 9 \, b \sin \left (d x + c\right )^{3} - 4 \, a \sin \left (d x + c\right )^{2} - 7 \, b \sin \left (d x + c\right )\right )}}{{\left (\sin \left (d x + c\right )^{2} - 1\right )}^{2}}}{16 \, d} \]

[In]

integrate(sec(d*x+c)^5*sin(d*x+c)^5*(a+b*sin(d*x+c)),x, algorithm="giac")

[Out]

-1/16*((8*a - 15*b)*log(abs(sin(d*x + c) + 1)) + (8*a + 15*b)*log(abs(sin(d*x + c) - 1)) + 16*b*sin(d*x + c) -
 2*(6*a*sin(d*x + c)^4 + 9*b*sin(d*x + c)^3 - 4*a*sin(d*x + c)^2 - 7*b*sin(d*x + c))/(sin(d*x + c)^2 - 1)^2)/d

Mupad [B] (verification not implemented)

Time = 12.39 (sec) , antiderivative size = 261, normalized size of antiderivative = 2.25 \[ \int (a+b \sin (c+d x)) \tan ^5(c+d x) \, dx=\frac {a\,\ln \left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )}{d}-\frac {\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+1\right )\,\left (a-\frac {15\,b}{8}\right )}{d}-\frac {\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-1\right )\,\left (a+\frac {15\,b}{8}\right )}{d}-\frac {\frac {15\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9}{4}+2\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8-10\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7-6\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+\frac {9\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5}{2}-6\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4-10\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+2\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+\frac {15\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{4}}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{10}-3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8+2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4-3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )} \]

[In]

int((sin(c + d*x)^5*(a + b*sin(c + d*x)))/cos(c + d*x)^5,x)

[Out]

(a*log(tan(c/2 + (d*x)/2)^2 + 1))/d - (log(tan(c/2 + (d*x)/2) + 1)*(a - (15*b)/8))/d - (log(tan(c/2 + (d*x)/2)
 - 1)*(a + (15*b)/8))/d - ((15*b*tan(c/2 + (d*x)/2))/4 + 2*a*tan(c/2 + (d*x)/2)^2 - 6*a*tan(c/2 + (d*x)/2)^4 -
 6*a*tan(c/2 + (d*x)/2)^6 + 2*a*tan(c/2 + (d*x)/2)^8 - 10*b*tan(c/2 + (d*x)/2)^3 + (9*b*tan(c/2 + (d*x)/2)^5)/
2 - 10*b*tan(c/2 + (d*x)/2)^7 + (15*b*tan(c/2 + (d*x)/2)^9)/4)/(d*(2*tan(c/2 + (d*x)/2)^4 - 3*tan(c/2 + (d*x)/
2)^2 + 2*tan(c/2 + (d*x)/2)^6 - 3*tan(c/2 + (d*x)/2)^8 + tan(c/2 + (d*x)/2)^10 + 1))